package org.example.system.domain.question.dto;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

@Documented
@Constraint(validatedBy = DifficultyValidator.class)
@Target({ FIELD })
@Retention(RUNTIME)
public @interface DifficultyValid {
    String message() default "难度只能为1(简单)、2(中等)、3(困难)";
    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};
}

